jQuery( function( $ ) {

	// date picker
	if( typeof $.fn.datepicker != 'undefined' ) {
		$( "input[name=publishDate]" ).datepicker( { dateFormat: 'yy-mm-dd' } );
	}
	$( '#icon-calendar' ).click( function() {
		$( "input[name=publishDate]" ).focus();
	});
	
	$('#addDetails').validate();
	
});
function chooseBox()
{
	var form = document.getElementById("adminMainForm");
	for(var i=0; i<form.length; i++)
	{
		if(form[i].type == "checkbox")
		{
			if(form[0].checked==false){
				form[i].checked=false;
			}else{
				form[i].checked=true;
			}
		}
	}
}

/* for navigation */
$(document).ready(function(){
	var offset = $('.mainLeftNavigation').offset();
	$('.mainLeftNavigation').css("height",$(document).height() - offset.top );
});